/*
 * usb_test.c
 *
 *  Created on: May 23, 2019
 *      Author: wang
 */


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "pusen_usb.h"

int main(int argc,char *argv[])
{
  int ret=0;
  pusen_usb usb_info;

  memset(&usb_info,0,sizeof(pusen_usb));
  ret= pusen_usb_get_space_info(argv[1],&usb_info);
  if(ret!=0){
      printf("get path:%s space info fail!ret=%d\n",argv[1],ret);
  }
  printf("Total size:%llu Bytes = %llu MBytes = %llu GBytes\n",usb_info.totlal_size,usb_info.totlal_size>>20,usb_info.totlal_size>>30);
  printf("Free size:%llu Bytes = %llu MBytes = %llu GBytes\n",usb_info.free_size,usb_info.free_size>>20,usb_info.free_size>>30);
  printf("Available size:%llu Bytes = %llu MBytes = %llu GBytes\n",usb_info.available_size,usb_info.available_size>>20,usb_info.available_size>>30);
  return ret;
}

